package com.smy.common;
import java.sql.*;
public class BaseDao {
    private BaseDao(){
    }
    public static final String tableFix = "so_";
    public static Connection getConnection(){
        try {
            return DriverManager.getConnection(LocalhostConstants.SIMPLE_OFFICE_URL, LocalhostConstants.USERNAME, LocalhostConstants.PASSWORD);
        } catch (SQLException e) {
            e.printStackTrace();
            return null;
        }
    }
    public static void close(Connection c, PreparedStatement ps , ResultSet rs){
        try {
            if (rs!=null)rs.close();
            if (ps!=null)ps.close();
            if (c!=null)c.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
